<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    <link rel="stylesheet" href="../layui/css/layui.css" />
</head>
<body>
<textarea id="demo" ></textarea>
<script type="text/javascript" src="../layui/layui.js" charset="utf-8"></script>
<script>
    layui.use('layedit', function(){
        var layer = layui.layer, $= layui.jquery,layedit=layui.layedit;
        var testEditor;
        layedit.set({
            uploadImage: {
                url: '/uploadFile' //接口url
                ,type: 'POST' //默认post
            }

        });
        layedit.build('demo', {
            height: 500,
            width: 250,
            tool: [ 'strong' //加粗
                ,'italic' //斜体
                ,'underline' //下划线
                ,'del' //删除线
                ,'|' //分割线
                ,'left' //左对齐
                ,'center' //居中对齐
                ,'right' //右对齐
                ,'link' //超链接
                ,'unlink' //清除链接
                ,'face' //表情
                ,'image' //插入图片
                ,'help' //帮助
            ],
        });
    });
</script>
</body>
</html>